/*
 *  Copyright (c) 2004-present, Facebook, Inc.
 *  All rights reserved.
 *
 *  This source code is licensed under the BSD-style license found in the
 *  LICENSE file in the root directory of this source tree. An additional grant
 *  of patent rights can be found in the PATENTS file in the same directory.
 *
 */
#pragma once

#include <boost/container/flat_map.hpp>
#include <list>
#include <mutex>
#include <string>
#include "fboss/agent/NeighborUpdaterImpl.h"
// #include "fboss/agent/ArpCache.h"
// #include "fboss/agent/NdpCache.h"
#include "fboss/agent/StateObserver.h"
#include "fboss/agent/state/PortDescriptor.h"
#include "fboss/agent/types.h"

namespace facebook::fboss {
/*
 * This is a replica of NeighborUpdaterImpl but with all
 * neighbor update logic stubbed out (hence the name noop). Idea is to disable
 * it for agent tests where the traffic generated by these routines is
 * interfering with the Invariant Tests
 */
class NeighborUpdaterNoopImpl {
 public:
  explicit NeighborUpdaterNoopImpl(SwSwitch* sw);
  ~NeighborUpdaterNoopImpl();

 private:
#define ARG_LIST_ENTRY(TYPE, NAME) TYPE NAME
#define NEIGHBOR_UPDATER_METHOD(VISIBILITY, NAME, RETURN_TYPE, ...) \
  RETURN_TYPE NAME(ARG_LIST(ARG_LIST_ENTRY, ##__VA_ARGS__));
#include "fboss/agent/NeighborUpdater-defs.h"
#undef NEIGHBOR_UPDATER_METHOD

  void portChanged(
      const std::shared_ptr<Port>& oldPort,
      const std::shared_ptr<Port>& newPort);

  void aggregatePortChanged(
      const std::shared_ptr<AggregatePort>& oldAggPort,
      const std::shared_ptr<AggregatePort>& newAggPort);
  // Forbidden copy constructor and assignment operator
  NeighborUpdaterNoopImpl(NeighborUpdaterNoopImpl const&) = delete;
  NeighborUpdaterNoopImpl& operator=(NeighborUpdaterNoopImpl const&) = delete;

  SwSwitch* sw_{nullptr};

  friend class NeighborUpdater;
};
} // namespace facebook::fboss
